/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ctrl.jeu;

import java.io.Serializable;

/**
 *
 * @author Willy
 */
public class Joueur implements Serializable{
    private String Nom;
    private String Prenom;
    private String Photo="defauthomme.png";
    private int MontantTotal;

    public Joueur(String Nom, String Prenom) {
        this.Nom = Nom;
        this.Prenom = Prenom;
    }
    public Joueur(String Nom, String Prenom, int MontantTotal) {
        this.Nom = Nom;
        this.Prenom = Prenom;
        this.MontantTotal = MontantTotal;
    }

    public Joueur(String Nom, String Prenom, String Photo, int MontantTotal) {
        this.Nom = Nom;
        this.Prenom = Prenom;
        this.Photo = Photo;
        this.MontantTotal = MontantTotal;
    }

    public int getMontantTotal() {
        return MontantTotal;
    }

    public void setMontantTotal(int MontantTotal) {
        this.MontantTotal = MontantTotal;
    }

    public String getNom() {
        return Nom;
    }

    public void setNom(String Nom) {
        this.Nom = Nom;
    }

    public String getPhoto() {
        return Photo;
    }

    public void setPhoto(String Photo) {
        this.Photo = Photo;
    }

    public String getPrenom() {
        return Prenom;
    }

    public void setPrenom(String Prenom) {
        this.Prenom = Prenom;
    }

    @Override
    public String toString() {
        return getPrenom()+" "+getNom();
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof Joueur)
            return ((Joueur) obj).getNom().equals(this.getNom())&&((Joueur) obj).getPrenom().equals(this.getPrenom());
        return false;
    }

    
}
